/*
 * SDL.h
 *
 *  Created on: Feb 11, 2011
 *      Author: alki
 */

#ifndef SDL_H_
#define SDL_H_

#include <SDL/SDL.h>
#include "GL.h"
#include "Exception.h"

/**
 * Klasse SDL: kümmert sich um die Initialisierung und Verwaltung von SDL
 */
class SDL {
public:
	SDL(int width,int height, int bits,bool fullscreen);
	virtual ~SDL();

	void PollEvent();
	void HandleKeyPress(SDL_keysym* keysym);

	GL* GetGL() { return this->m_gl; }
	bool done() { return this->m_done; }
	bool active() { return this->m_active; }

private:
	int m_width;
	int m_height;
	int m_bits;
	bool m_fullscreen;
	int m_videoflags;

	SDL_Surface *m_surface;
	GL *m_gl;

	bool m_done;
	bool m_active;
};

#endif /* SDL_H_ */
